<?php
/**
 * SHA1
 *
 * @version 0.2a
 */

// No direct access
defined( "__DEENZO__" ) or die( "deenzo$" ); 

function ssha( $str ) {
    
	/* Generate SSHA hash */
    mt_srand( (double) microtime() * 1000000);
	
    $salt = pack("CCCC", mt_rand(), mt_rand(), mt_rand(), mt_rand());
    $hash = "{SSHA}" . base64_encode( pack( "H*", sha1 ( $str . $salt ) ) . $salt );

    return $hash;
	
}